import Taro, { Component } from '@tarojs/taro'
import { View, Text, Icon } from '@tarojs/components'
import { AtIcon,AtNoticebar } from 'taro-ui'
import SearchInput from '../../components/SearchInput/SearchInput'
import exampleIcon from '../../images/index/successExample.png'
import ProductItem from '../../components/ProductItem/ProductItem'
import NewsItem from '../../components/NewsItem/NewsItem'
import BottomLine from '../../components/BottomLine/BottomLine'

//引入银行图片资源
import b1 from '../../images/bank/2.png'
import b2 from '../../images/bank/0.png'
import b3 from '../../images/bank/1.png'
import b4 from '../../images/bank/3.png'
import b5 from '../../images/bank/4.png'

import './index.scss'

export default class Index extends Component {

  config = {
    navigationBarTitleText: '首页'
  }

  render () {
    return (
      <View className='index'>
        <SearchInput></SearchInput>
        <Image mode='widthFix' className='indexBgm' src="https://gitee.com/zhangruiyuan/loudi-weapp-poc-img/raw/master/images/index/inedxBg.png"></Image>
        <View className='example_row'>
          <View className='exampleIcon'><Image mode='widthFix'  src={exampleIcon}></Image></View>
          <View className='example_notice_icon'></View>
          <View className='example_content'>
            <AtNoticebar className='example_atNoticebar' marquee  >
              “小微创业贷”   信用贷款100万   “大学生学业贷”   信用贷款10万 
            </AtNoticebar>
          </View>
        </View>
        <View className='floor'>
          <Navigator url='/pages/wantToFinance/wantToFinance' className='floorItem'>
            <Image mode='widthFix' src="https://gitee.com/zhangruiyuan/loudi-weapp-poc-img/raw/master/images/floor/1.png"></Image>
            <View>我要融资</View>
          </Navigator>
          <Navigator url='/pages/product/product' open-type='switchTab' className='floorItem'>
            <Image mode='widthFix' src="https://gitee.com/zhangruiyuan/loudi-weapp-poc-img/raw/master/images/floor/2.png"></Image>
            <View>金融产品</View>
          </Navigator>
          <Navigator url='/pages/news/news' open-type='switchTab'  className='floorItem'>
            <Image mode='widthFix' src="https://gitee.com/zhangruiyuan/loudi-weapp-poc-img/raw/master/images/floor/3.png"></Image>
            <View>政策支持</View>
          </Navigator>
          <Navigator url='/pages/needList/needList' className='floorItem'>
            <Image mode='widthFix' src="https://gitee.com/zhangruiyuan/loudi-weapp-poc-img/raw/master/images/floor/4.png"></Image>
            <View>进度查询</View>
          </Navigator>
        </View>
        <View className='products'>
          <View className='products_title_row'>
            <View className="product_title">金融产品</View>
            <Navigator className="product_more" url='/pages/product/product' openType='switchTab'>更多 >></Navigator>
          </View>
          <View className='products_content'>
            <ProductItem url='/pages/product/details?id=1' openType='navigate' src={b1} name="农村信保贷" productType="信保基金" rate="4.35%~5.66%" time='6~12个月' rateType='参考利率'></ProductItem>
            <ProductItem url='/pages/product/details?id=1' openType='navigate' src={b2} name="农村信保贷" productType="信保基金" rate="4.35%~5.66%" time='6~12个月' rateType='参考利率'></ProductItem>
            <ProductItem url='/pages/product/details?id=1' openType='navigate' src={b3} name="农村信保贷" productType="信保基金" rate="4.35%~5.66%" time='6~12个月' rateType='参考利率'></ProductItem>
            <ProductItem url='/pages/product/details?id=1' openType='navigate' src={b4} name="农村信保贷" productType="信保基金" rate="4.35%~5.66%" time='6~12个月' rateType='参考利率'></ProductItem>
            <ProductItem url='/pages/product/details?id=1' openType='navigate' src={b1} name="农村信保贷" productType="信保基金" rate="4.35%~5.66%" time='6~12个月' rateType='参考利率'></ProductItem>
          </View>
        </View>
        <View className='newses'>
          <View className='newses_title_row'>
            <View className="news_title">政策扶持</View>
            <Navigator className="news_more" url='/pages/news/news' openType='switchTab'>更多 >></Navigator>
          </View>
          <View className='newses_content'>
            <NewsItem url='/pages/news/newsDetail/newsDetail?id=1' title='湖南省人民政府办公厅关于印发《湖南省优化经济发展环境规定》的通知' time='2019.05.24' source='来源：中国政府网'></NewsItem>
            <NewsItem url='/pages/news/newsDetail/newsDetail?id=2' title='娄底市人民政府关于加快推进现代服务业发展的若干意见' time='2019.05.24' source='来源：中国政府网'></NewsItem>
            <NewsItem url='/pages/news/newsDetail/newsDetail?id=3' title='湖南省人民政府办公厅关于印发《湖南省推进电子商务与快递物流协同发展实施方都是进口钢' time='2019.05.24' source='来源：中国政府网'></NewsItem>
            <NewsItem url='/pages/news/newsDetail/newsDetail?id=4' title='娄底市人民政府关于支持娄底高新技术产业开发区加快发展的若干意见' time='2019.05.24' source='来源：中国政府网'></NewsItem>
            <NewsItem url='/pages/news/newsDetail/newsDetail?id=5' title='新经济下融资租赁业蓝海将进一步开启' time='2019.05.24' source='来源：中国政府网'></NewsItem>
          </View>
          <View className="index_bottom">
            <BottomLine></BottomLine>
          </View>
        </View>
      </View>
    )
  }
}
